#include <iostream>
#include <vector>

using namespace std;

int main(){
	//vector
	int n = 3;
	vector<int> v1(n);
	for(int i= 0; i < n; i++){
		cin >> v1[i];
	}
	
	for(int i= 0; i < v1.size(); i++){
		cout << v1[i] << ' ';
	}
	cout << endl;
	for(int x : v1){
		cout << x << ' ';
		
	}
	
	cout << endl;
	for(auto it = v1.begin(); it != v1.end();){
		if(*it == 1){
			it = v1.erase(it);
		}else{
			++it;
		}
	}
	cout << endl;
	
	for(auto it = v1.begin(); it != v1.end(); ++it){
		cout << *it << ' ';
	}
	cout << endl;
	
	vector<vector<int>> v2;
	for(int i= 0; i < n; i++){
		v2.push_back(vector<int>());
		for(int j = 0; j < n; j++){
			int num;
			cin >> num;
			v2[i].push_back(num);
		}
	}
	for(auto & row : v2){
		for(auto & val : row){
			cout << val << ' ';
		}
		cout << endl;
	}
	for(auto i = v2.begin(); i != v2.end(); ++i){
		for(auto j = i->begin(); j != i->end(); ++j){
			cout << *j << ' ';
		}
		cout << endl;
	}
		
	return 0;
} 
